#include <QApplication>
#include <main_window.h>
#include <intro_dialog.h>
#include "quit_handler.h"

int main(int argc, char** argv)
{
		qint16 retCode = 0;
		QApplication app(argc, argv);
		IntroDialog intro;
		app.setStyleSheet("QWidget {background: qlineargradient(spread:pad, x1:0.183, y1:0.949, x2:1, y2:0.261, stop:0 rgba(255, 162, 72, 255), stop:0.197309 rgba(255, 255, 71, 255), stop:0.41704 rgba(255, 138, 52, 255), stop:0.623318 rgba(255, 255, 0, 255), stop:0.762332 rgba(255, 155, 45, 255), stop:0.896861 rgba(255, 255, 0, 255))}\
QLabel {background: none;}\
QGroupBox {background: none;}\
QPushButton {background: none;}\
QLineEdit {background: none;}");
		if (intro.exec() == QDialog::Accepted) {
			MainWindow win;
			QuitHandler qh;
			QObject::connect(&app, SIGNAL(aboutToQuit()), &qh, SLOT(handle()));
			win.moveToCenter();
			win.show();
			retCode = app.exec();
	  }
		return retCode;
}
